package com.poetize.plus.entity.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Null;
import lombok.Data;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

/**
 * @author zuosy
 * @created 2024/3/29 13:10
 */
@Data
@Schema(name = "管理页面角色信息入参", hidden = true)
public class RoleDTO {

    @Null(message = "id必须为空", groups = {Insert.class})
    @NotNull(message = "id不能为空", groups = {Update.class})
    @Schema(description = "id")
    private Long id;

    @Schema(description = "角色名称")
    @NotBlank(message = "角色名称不能为空", groups = {Insert.class, Update.class})
    private String name;

    @Schema(description = "角色编码")
    @NotBlank(message = "角色编码不能为空", groups = {Insert.class, Update.class})
    private String code;

    @Schema(description = "是否禁用")
    private Boolean status;
}
